package com.hj.service;

import com.hj.configure.FeignConfiguration;
import com.hj.domain.User;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

@FeignClient(value="provider-service",
             fallback = UserServiceFallBack.class,
             configuration = FeignConfiguration.class
) //指定feign调用哪个服务
public interface UserService {

    @RequestMapping("/user/findUserById")
    public User findUserById(@RequestParam("id") Integer id);
}
